﻿
@{
    ViewBag.Title = "WorkCenterTree";
}

<h2 class="contentTitle">树形菜单</h2>

<div id="resultBox"></div>

<div style="float:left; display:block; margin:10px; overflow:auto; width:200px; height:200px; overflow:auto; border:solid 1px #CCC; line-height:21px; background:#FFF;">
    <p>treeFolder treeCheck expand</p>
    <form method="post" action="demo/common/ajaxDone.html" class="pageForm required-validate" onsubmit="return validateCallback(this)">
        <ul class="tree treeFolder treeCheck expand" oncheck="kkk">
            <li>
                <a>上角自动化车间</a>
                <ul>
                    <li><a tname="name" tvalue="value1" checked="true">S01</a></li>
                    <li><a tname="name" tvalue="value2">S02</a></li>
                    <li><a tname="name" tvalue="value3">S03</a></li>
                    <li><a tname="name" tvalue="value4">S04</a></li>
                    <li><a tname="name" tvalue="value5">S05</a></li>
                </ul>
            </li>

            <li>
                <a tname="name" tvalue="test1">东城自动化车间</a>
                <ul>
                    <li>
                        <a tname="name" tvalue="test1.1">东城自动化车间1线</a>
                        <ul>
                            <li><a tname="name" tvalue="test1.1.1" checked="true">A01</a></li>
                            <li><a tname="name" tvalue="test1.1.2" checked="false">A02</a></li>
                            <li><a tname="name" tvalue="test1.1.2" checked="false">A03</a></li>
                        </ul>
                    </li>
                    <li>
                        <a tname="name" tvalue="test1.1">东城自动化车间2线</a>
                        <ul>
                            <li><a tname="name" tvalue="test1.1.1" checked="true">B01</a></li>
                            <li><a tname="name" tvalue="test1.1.2" checked="false">B02</a></li>
                            <li><a tname="name" tvalue="test1.1.2" checked="false">B03</a></li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>

        <input type="submit" value="Submit" />
    </form>
</div>

<script type="text/javascript">
function kkk(){
	var json = arguments[0], result="";
	$(json.items).each(function(i){
		result += "<p>name:"+this.name + " value:"+this.value+" text: "+this.text+"</p>";
	});
	$("#resultBox").html(result);
}
</script>
